﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class PausePopupControl : MonoBehaviour
{
	public Button bSound;

	void OnEnable ()
	{
		GameManager.gameState = GameState.PAUSING;
		Time.timeScale = 0;
	}

	public void Continue ()
	{
		Time.timeScale = 1;
		GameManager.gameState = GameState.PLAYING;
		gameObject.SetActive (false);
	}

	public void Replay ()
	{
		Time.timeScale = 1;
		LoadSceneFading.LoadScene ("scn_play");
	}

	public void Menu ()
	{
		Time.timeScale = 1;
		LoadSceneFading.LoadScene ("scn_select_level");
	}

	public void ChangeSoundStatus ()
	{
		bSound.image.sprite = AudioManager.instance.ChangeSoundStatus ();
	}

}
